<?php

use Illuminate\Http\Request;


Route::post('login/user', 'AuthController@users');
Route::resource('post', 'PostsController');

Route::group(['namespace' => 'Test'], function () {

    Route::resource('test', 'TestController');

});

Route::middleware('scope:users.*')->get('/user', function (Request $request) {
    return $request->user();
});

Route::group([
    'namespace' =>  'Api\V1',
    'prefix'    =>  'v1',
], function () {
    Route::resource('promote', 'PromoteController');
    Route::get('CartIncrease', 'CartsController@increase');
    Route::get('CartReduce', 'CartsController@reduce');
    Route::get('getGoodsForOrder', 'CartsController@getGoodsForOrder');
    Route::get('orders/all','OrderInfoController@all');
    Route::get('orders/queue','OrderInfoController@test_queue');
    Route::get('orders/bonus','OrderInfoController@test_bonus');
    Route::get('orders/checkout','OrderInfoController@orderCheckOut');
    Route::resource('orders', 'OrderInfoController');

    Route::get('home/{id}/{isShow?}', 'HomeController@index');
    Route::get('seminar/{id}/{isShow?}', 'SeminarController@index');
    Route::get('album/{id}/{isShow?}', 'AlbumController@index');

    Route::post('workorder/get_order_list', 'WorkOrderController@getOrderList');
    Route::post('workorder/get_order_goods_list', 'WorkOrderController@getOrderGoodsList');
    Route::post('opensearch/lists', 'OpenSearchController@lists');
});